<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>按钮组</title>
	<link rel="stylesheet" href="../css/bootstrap.css">
	<style type="text/css">
		
	</style>
</head>
<body>
	<div class="container">
		<div class="btn-group btn-group-lg">
		</div>
	</div>
	<script src="../js/jquery-3.4.1.js" type="text/javascript"></script>
	<script src="../js/bootstrap.js"></script>
	<script>
		$(function() {
			let btnArr = [
				{class:'btn btn-primary',content:'left'},
				{class:'btn btn-info',content:'center'},
				{class:'btn btn-warning',content:'right'},
				{class:'btn btn-danger',content:'default'},
				{class:'btn btn-default',content:'default'}
			]
			let btnGroup = $('.btn-group');
			btnArr.forEach(function(item, index) {
				let btn = $(`<button class="${item.class}">${item.content}</button>`)
				btnGroup.append(btn);
			})
			let num = 17
			let text = `hello web${num}`
			console.log(text)
		})
	</script>
</body>
</html>
